package com.yuzhitong.shapi.contract;

import com.yuzhitong.shapi.base.BaseView;
import com.yuzhitong.shapi.base.net.BaseListBean;
import com.yuzhitong.shapi.base.net.BaseObjectBean;
import com.yuzhitong.shapi.bean.AdStatusBean;
import com.yuzhitong.shapi.bean.NavigationBean;

import java.util.List;
import java.util.Map;

import io.reactivex.rxjava3.core.Observable;

/**
 * @ClassName: TestContract
 * @Author: 70488
 * @CreateDate: 2020/07/18 14:58
 * @UpdateRemark: 更新说明：
 * @Description: 导航
 */
public interface NavigationContract {
    interface Model {
        /**
         * 判断广告开启
         */
        Observable<BaseListBean<AdStatusBean>> getAdState(Map<String, Object> par);

        /**
         * 获取搜索地址
         */
        Observable<BaseObjectBean<String>> getSearchUrl(Map<String, Object> par);

        /**
         * 首页导航列表
         */
        Observable<BaseListBean<NavigationBean>> getNavigationList(Map<String, Object> par);

    }

    interface View extends BaseView {

        /**
         * 搜索地址
         *
         * @param url 地址
         */
        void searchUrl(String url);

        /**
         * 无搜索地址
         */
        void searchUrlEmpty();

        /**
         * 显示首页导航列表
         *
         * @param navigationBeans 首页导航列表
         */
        void showNavigationList(List<NavigationBean> navigationBeans);
    }

    interface Presenter {
        /**
         * 判断广告
         */
        void getAdState();

        /**
         * 获取搜索链接
         */
        void getSearchUrl(String searchText);

        /**
         * 获取首页导航列表
         */
        void getNavigationList();
    }
}
